package com.ruoyi.common.core.domain.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @version :
 * @program: easyBuy
 * @description: 极光发送消息model
 * @author: 周爱鸿
 * @create: 2020-09-18 14:05
 **/
@ApiModel("极光发送消息model")
@Data
public class IMMessageModel {
	@NotNull
	@ApiModelProperty("版本号 目前是1")
	private Integer version;

	@NotEmpty
	@ApiModelProperty("发送目标类型 single - 个人，group - 群组 chatroom - 聊天室")
	private String targetType;

	@NotEmpty
	@ApiModelProperty("发送消息者的身份，可为admin，user")
	private String fromType;

	@NotEmpty
	@ApiModelProperty("目标id single填username group 填Group id chatroom 填chatroomid")
	private String targetId;

	@ApiModelProperty("跨应用目标appkey（选填）")
	private String targetAppkey;

	@NotEmpty
	@ApiModelProperty("发送者的username")
	private String fromId;


	@ApiModelProperty("发送者展示名")
	private String fromName;

	@ApiModelProperty("接受者展示名")
	private String targetName;

	@ApiModelProperty("消息是否离线存储 true或者false，默认为false，表示需要离线存储（选填）")
	private Boolean noOffline;

	@ApiModelProperty("消息是否在通知栏展示 true或者false，默认为false，表示在通知栏展示（选填）")
	private Boolean noNotification;

	@ApiModelProperty("自定义通知栏展示（选填）")
	private Notification notification;

	@Data
	public static class  Notification{
		@ApiModelProperty("通知的标题（选填）")
		private String title;

		@ApiModelProperty("通知的内容（选填）")
		private String alert;
	}

}
